Optimal. Leaf size=114 \[ \frac {\cos (e+f x) (a \sin (e+f x)+a)^{m+1} (c-c \sin (e+f x))^{-m-2}}{a c^2 f \left (4 m^2+16 m+15\right )}+\frac {\cos (e+f x) (a \sin (e+f x)+a)^{m+1} (c-c \sin (e+f x))^{-m-3}}{a c f (2 m+5)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.33, antiderivative size = 114, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.079, Rules used = {2841, 2743, 2742} \[ \frac {\cos (e+f x) (a \sin (e+f x)+a)^{m+1} (c-c \sin (e+f x))^{-m-2}}{a c^2 f \left (4 m^2+16 m+15\right )}+\frac {\cos (e+f x) (a \sin (e+f x)+a)^{m+1} (c-c \sin (e+f x))^{-m-3}}{a c f (2 m+5)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2742
Rule 2743
Rule 2841
Rubi steps
\begin {align*} \int \cos ^2(e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-4-m} \, dx &=\frac {\int (a+a \sin (e+f x))^{1+m} (c-c \sin (e+f x))^{-3-m} \, dx}{a c}\\ &=\frac {\cos (e+f x) (a+a \sin (e+f x))^{1+m} (c-c \sin (e+f x))^{-3-m}}{a c f (5+2 m)}+\frac {\int (a+a \sin (e+f x))^{1+m} (c-c \sin (e+f x))^{-2-m} \, dx}{a c^2 (5+2 m)}\\ &=\frac {\cos (e+f x) (a+a \sin (e+f x))^{1+m} (c-c \sin (e+f x))^{-3-m}}{a c f (5+2 m)}+\frac {\cos (e+f x) (a+a \sin (e+f x))^{1+m} (c-c \sin (e+f x))^{-2-m}}{a c^2 f (3+2 m) (5+2 m)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 12.61, size = 142, normalized size = 1.25 \[ -\frac {2^{-m-1} \cos ^3\left (\frac {1}{2} \left (-e-f x+\frac {\pi }{2}\right )\right ) \sin ^{-2 m-5}\left (\frac {1}{2} \left (-e-f x+\frac {\pi }{2}\right )\right ) (\sin (e+f x)-2 (m+2)) (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{-m-4} \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^{-2 (-m-4)}}{f (2 m+3) (2 m+5)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.46, size = 76, normalized size = 0.67 \[ \frac {{\left (2 \, {\left (m + 2\right )} \cos \left (f x + e\right )^{3} - \cos \left (f x + e\right )^{3} \sin \left (f x + e\right )\right )} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} {\left (-c \sin \left (f x + e\right ) + c\right )}^{-m - 4}}{4 \, f m^{2} + 16 \, f m + 15 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (a \sin \left (f x + e\right ) + a\right )}^{m} {\left (-c \sin \left (f x + e\right ) + c\right )}^{-m - 4} \cos \left (f x + e\right )^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 5.40, size = 0, normalized size = 0.00 \[ \int \left (\cos ^{2}\left (f x +e \right )\right ) \left (a +a \sin \left (f x +e \right )\right )^{m} \left (c -c \sin \left (f x +e \right )\right )^{-4-m}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (a \sin \left (f x + e\right ) + a\right )}^{m} {\left (-c \sin \left (f x + e\right ) + c\right )}^{-m - 4} \cos \left (f x + e\right )^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 10.60, size = 177, normalized size = 1.55 \[ -\frac {{\left (a\,\left (\sin \left (e+f\,x\right )+1\right )\right )}^m\,\left (2\,\sin \left (2\,e+2\,f\,x\right )+\sin \left (4\,e+4\,f\,x\right )+48\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+16\,{\sin \left (\frac {3\,e}{2}+\frac {3\,f\,x}{2}\right )}^2+12\,m\,\left (2\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-1\right )+4\,m\,\left (2\,{\sin \left (\frac {3\,e}{2}+\frac {3\,f\,x}{2}\right )}^2-1\right )-32\right )}{c^4\,f\,{\left (-c\,\left (\sin \left (e+f\,x\right )-1\right )\right )}^m\,\left (4\,m^2+16\,m+15\right )\,\left (56\,{\sin \left (e+f\,x\right )}^2-56\,\sin \left (e+f\,x\right )-2\,{\sin \left (2\,e+2\,f\,x\right )}^2+8\,\sin \left (3\,e+3\,f\,x\right )+8\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________